package de.koller.worlders.engine.util;

import de.koller.oceanFramework.OceanException;
import de.koller.oceanFramework.gl.util.ParticleTexture;
import de.koller.worlders.WSea;
import de.koller.worlders.render.util.TextureRep;
import java.awt.image.BufferedImage;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import javax.imageio.ImageIO;

public class BufferCollection extends WSea {

	private final Map< TextureRep, ParticleTexture > buffer = new HashMap<>();
	
	public final BufferedImage limbs;
	public final BufferedImage tiles;

	public BufferCollection() {
		ClassLoader cl = this.getClass().getClassLoader();
		InputStream in;
		
		try {
			in = cl.getResourceAsStream( "data/limbs.png" );
			limbs = ImageIO.read( in );
			
			in = cl.getResourceAsStream( "data/tiles.png" );
			tiles = ImageIO.read( in );
		} catch( Exception ex ) {
			throw new OceanException( ex );
		}
	}

	public Map<TextureRep, ParticleTexture> getBuffer() {
		return buffer;
	}
	
}
